<?php

include("config.php");
$db_rdata = new DB($rdata_server_username,$rdata_server_pass,$rdata_server_db,$rdata_server,$rdata_driver);

header ("Content-Type:text/xml");

if (isset($_REQUEST["card"])){
	$sql = "select * from n51_suth_c where N51_c_kodas_kt= '".addslashes_mssql($_REQUEST["card"])."'";
	$info = $db_rdata->returnInfo($sql);

	if (!empty($info)) {
		echo "<result>\n";
		echo "<credit>".$info["N51_c_limitas"]."</credit>\n";
		echo "<nuo>".$info["n51_valanda_nuo"]."</nuo>\n";
		echo "<iki>".$info["n51_valanda_iki"]."</iki>\n";
		echo "<p1>".$info["n51_pirmadienis"]."</p1>\n";
		echo "<p2>".$info["n51_antradienis"]."</p2>\n";
		echo "<p3>".$info["n51_treciadienis"]."</p3>\n";
		echo "<p4>".$info["n51_ketvirtadienis"]."</p4>\n";
		echo "<p5>".$info["n51_penktadienis"]."</p5>\n";
		echo "<p6>".$info["n51_sestadienis"]."</p6>\n";
		echo "<p7>".$info["n51_sekmadienis"]."</p7>\n";
		echo "</result>";
	} else {
		echo "<result></result>";
	}
} else {
	echo "<result></result>";
}
?>